<?php ob_start();
include("header.php" );
if(isset($_REQUEST['url'])){ 
	$sql2=mysql_query("SELECT * FROM `my_business_url` WHERE  `url`='".$_REQUEST['url']."' ")or die(mysql_error());

	if(mysql_num_rows($sql2)){	
		$rows=mysql_fetch_array($sql2);
	}else{
		header("location:index.php"); exit;
	}
}
?>
<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
	$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<!--new page-->
<div class="clear"></div>
<div id="newpage">
  <div class="pageinner">
    <div class="headboxy">
        <?php  $article=get_allitem('my_article','url_id',$rows['id']);?> 
      <h1><?php echo substr($article['article_title'],0,40); ?></h1>
       <a href="javascript:;"  class="laro"><img src="images/rarrow.jpg"  alt="" /></a> 
      <div class="more"> <?php echo strip_tags(stripslashes($article['article_discription']),"<p><div><a><br><ul><li>"); ?>
       
</div>
      
  
	<?php $url=get_allitem('my_url','url_id',$rows['id']);
	if(!empty($url['url'])){
	?>
    <div class="contant" style="height:auto;">
     	<iframe id="myiframe" src="<?php echo $url['url']; ?>" height="<?php echo $url['height']; ?>" width="750" scrolling="no"></iframe>
    </div>
    <?php }else{?>
    <div class="contant" style="height:auto;">
     	<img src="uploads/<?php echo $url['photo']; ?>" height="100%"  width="750" >
    </div>
     <?php }?>
    <div class="contant" style="height:auto; background:none;" >

    </div>
    <?php 
        $sql=mysql_query("SELECT * FROM `my_images` WHERE `url_id`='".$rows['id']."' ")or die(mysql_error());
		$num=mysql_num_rows($sql);if($num>0){
	?>
    <div class="slider">
      <ul>
		<?php 
		 while($row=mysql_fetch_array($sql)){	
		?>
        <li><a href="uploads/<?php echo $row['image']; ?>" rel="prettyPhoto[gallery1]">
        <img src="uploads/thumb/t_<?php echo $row['image']; ?>"   alt="<?php echo $row['alt_text']; ?>" /></a></li>
        <?php }?>
      </ul>
    </div>    
    
    <? if ( $num > 3 ) { ?>
    <div class="nextprev"> <a href="javascript:;" class="prev"> <img src="images/pre.jpg" alt=""  /> </a> <a href="javascript:;" class="next"> <img src="images/nex.jpg"  alt="" /> </a> </div>
    <? } ?>
	
	<?php }?>
    
    
    
    
    
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-comments" data-href="<?php echo site_url(); ?>" data-width="745" data-num-posts="2"></div>
  </div>
</div></div>
 
<!--new page end-->

<?php include("footer.php");  ?>